{extend name="public/base" /}

{block name="title"}<title>{:lang('list')}</title>{/block}

{block name="pjax_container"}
<section class="content">
    <div class="row">
        <div class="col-md-12">
            <div class="box box-primary">
                <div class="box-header with-border" style="height:51px;" >
                    {include file="public/top_action" /}
                    {include file="public/search_time" /}
                    {include file="public/search" /}
                </div>
                <div class="box-body table-responsive">
                    <table class="table table-hover table-bordered">
                        <tr>
                            <th width="36"><input type="checkbox" class="icheck checkbox-toggle"></th>
                            <th>{:lang('id')}{:table_sort('id')}</th>
                            <th>{:lang('avatar')}</th>
                            <th>{:lang('username')}{:table_sort('username')}<br />{:lang('name')}{:table_sort('name')}<br />{:lang('auth_group_title')}</th>
                            <th>{:lang('mobile')}{:table_sort('mobile')}<br />{:lang('email')}{:table_sort('email')}<br />{:lang('sex')}{:table_sort('sex')}</th>
                            <th>{:lang('create_time')}{:table_sort('create_time')} / {:lang('reg_ip')}{:table_sort('reg_ip')}</th>
                            <th>{:lang('last_time')}{:table_sort('last_time')} / {:lang('last_ip')}{:table_sort('last_ip')}</th>
                            <th>{:lang('logins')}{:table_sort('logins')}</th>
                            <th>{:lang('status')}{:table_sort('status')}</th>
                            <th width="204">{:lang('action')}</th>
                        </tr>
                        {volist name="dataList" id="vo"}
                        <tr>
                            <td><input type="checkbox" name="id[]" value="{$vo.id}" class="icheck"></td>
                            <td>{$vo.id}</td>
                            <td><img src="{$vo.avatar}" style="width:50px;border-radius:50%;" /></td>
                            <td>{$vo.username}<br />{:list_write($vo, 'name')}<br /><span class="label label-danger">{$vo.title}</span></td>
                            <td>{:list_write($vo, 'mobile')}<br />{:list_write($vo, 'email')}<br />{$vo.sex_text}</td>
                            <td>{$vo.create_time|time_turn}<br />{$vo.reg_ip}</td>
                            <td>{$vo.last_time|time_turn}<br />{$vo.last_ip}</td>
                            <td>{$vo.logins}</td>
                            <td>{:list_status($vo['id'], $vo['status'])}</td>
                            <td>
                                {:auth_action(CONTROLLER_NAME.'/authGroup', 'a', lang('auth_group'), ['id' => $vo.id], 'success')} 
                                {include file="public/list_action" /}
                            </td>
                        </tr>
                        {/volist}
                    </table>
                </div>
                <div class="box-footer clearfix">
                    {$dataList->render()|raw}
                </div>
            </div>
        </div>
    </div>
</section>
<script type="text/javascript">
$(function(){
    index_list_init();
})
</script>
{/block}